package cn.wolfcode.feign;

import cn.wolfcode.domain.Product;
import cn.wolfcode.hystrix.ProductFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Description: Feign远程调用接口
 * @Author: 伍家钰
 * @Date: 2020/8/28 20:35
 * @Version: 1.0
 */
@FeignClient(name = "PRODUCT-SERVER", fallback = ProductFeignHystrix.class)
public interface IProductFeignApi {
    @GetMapping("/products/get/{id}")
    Product get(@PathVariable("id") Long id);
}

